package com.uvnos4j.matilda.schedule.service;

import com.uvnos4j.matilda.commons.service.BaseService;
import com.uvnos4j.matilda.commons.services.schedule.ScheduleService;
import com.uvnos4j.matilda.schedule.domain.ScheduleTask;

/**
 * 任务调度 Service
 * <p>
 * Description:任务调度 Service
 * </p>
 *
 * @author Guo.wl
 * @version v1.0.0
 * @see com.uvnos4j.matilda.schedule.service
 * @since 2020-08-31 22:43:59
 */
public interface ScheduleTaskService extends BaseService<ScheduleTask>, ScheduleService {

    /**
     * 启动
     *
     * @param taskKey 任务key
     * @return 是否启动
     */
    boolean start(String taskKey);

    /**
     * 停止
     *
     * @param taskKey 任务key
     * @return 是否停止
     */
    boolean stop(String taskKey);

    /**
     * 重启
     *
     * @param taskKey 任务key
     * @return 是否重启
     */
    boolean restart(String taskKey);
}